<script type="text/javascript">
{literal}	
$(document).ready(function(){
{/literal}
	var canEdit = {$canEditEncounter};
	var recordId = {$recordId};
	var curDep = {$me->get_department_id()};		
 	{literal}		
	$.ajax ({
		type: 	 "GET",
		url:	 "../GeneralEmr/buildSelectionPanelAjax?set_ajax_view",
		data:     "recordId=" + recordId + "&selectedEmr=" + canEdit,
		dataType: 	"json",
		beforeSend:	function() {},
		complete: 	function() {},
		success: function(data) {
			if (data.error == null) {
				$('div#selectionPanel').html(data.content);					
			} else {
				$('span#statusMessage').html(data.error);
			}
			if($('#recordId').length > 0){
				$('#recordId').val($('#medicalRecordId').val());
			} 
			
		}
	});
});
{/literal}
</script>
<input type="hidden" id="medicalRecordId" name="medicalRecordId" value={$recordId}>
<span id='statusMessage' class='formAlertMsg'></span>
<div id='selectionPanel' class='filter_container' style='margin-top: 5px; padding: 0px; display: none;'></div>
<div id='encounterPageContent' style='display: none; margin-top: 5px;'>
    
</div>